package com.example.controller;

import com.example.entity.Result;
import com.example.service.StoreService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author:tjf
 * @Description:
 */
@RequestMapping("/statistics")
@RestController
public class StatisticsController {
    @Autowired
    private StoreService storeService;
    /**
     * 查询各个仓库的商品库存量接口url/statistics/store-invent
     * @return
     */
    @RequestMapping("/store-invent")
    public Result queryTotalInventForEachStore(){
        // 执行查询各个仓库的商品库存量的业务方法
        List<com.example.entity.Statistics> statisticsList = storeService.queryTotalInventForEachStore();

        return Result.ok(statisticsList);
    }
}
